<html>
    <head><script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script></head>
    <body>测试
    	<br>
    <input type="text" style="width:500px" name="" value="http://user.l.dongdongidea.com" id="url">
    <input type="text" value="get" id="type" name="">
    <button onclick="send()">发送</button>
    <pre id="res">

    	</pre>
</body>
</html>
<script>
	function send(){
		 $.ajax({
		      type: $('#type').val(),
		      url: $('#url').val(),
		      success: function(msg){
		         alert( "Data: " + msg );
		         console.log(msg); 
		         $('#res').html(msg); 
		       }
		    });	
	}
</script>